package com.tanhua.dubbo.server.api;

import com.tanhua.dubbo.server.pojo.Album;
import com.tanhua.dubbo.server.pojo.Comment;
import com.tanhua.dubbo.server.pojo.PageInfo;
import com.tanhua.dubbo.server.pojo.Publish;

import java.util.List;

/**
 * @description:
 * @author: Administrator
 * @date: Created in 2021/2/20 14:08
 * @version: 0.0.1
 * @modified By:
 */
public interface QuanZiApi {
    /**
     * @description 发布动态
     * @author
     * @date
     * @param
     *@return
     */
    String savePublish(Publish publish);
    /**
     * @description 查询动态
     * @author
     * @date
     * @param
     *@return
     */
    PageInfo<Publish>queryPublishList(Long userId,Integer page,Integer pageSize);
    /**
     * @description 点赞
     * @author
     * @date
     * @param
     *@return
     */
    boolean saveLikeComment(Long userId,String publishId);
    /**
     * @description 取消点赞、喜欢等
     * @author
     * @date
     * @param
     *@return
     */
    boolean removeLikeComment(Long userId,String publishId,Integer commentType);
    /**
     * @description 喜欢
     * @author
     * @date
     * @param
     *@return
     */
    boolean saveLoveComment(Long userId,String publishId);
    /**
     * @description 保存评论
     * @author
     * @date
     * @param
     *@return
     */
    boolean saveComment(Long userId,String publishId,Integer type,String content);
    /**
     * @description 查询评论数
     * @author
     * @date
     * @param
     *@return
     */
    Long queryCommentCount(String publishId,Integer type);
    /**
     * @description  根据id查询动态
     * @author
     * @date
     * @param
     *@return
     */
    Publish queryPublishById(String publishId);
    /**
     * @description 查询评论
     * @author
     * @date
     * @param
     *@return
     */
    PageInfo<Comment>queryCommentList(String publishId,Integer page,Integer pageSize);

    /**
     * @description 查询用户的评论数据
     * @author
     * @date
     * @param
     *@return
     */
    PageInfo<Comment>queryCommentListByUser(Long userId,Integer type,Integer page,Integer pageSize);
    /**
     * @description 根据pid批量查询数据
     * @author
     * @date
     * @param
     *@return
     */
    List<Publish> queryPublishByPids(List<Long> pidList);
    /**
     * @description 查询相册表
     * @author
     * @date
     * @param
     *@return
     */
    PageInfo<Publish>queryAlbumList(Long userId,Integer page,Integer pageSize);
}
